package com.cxh.rmsq.ui.adapter.self

import android.content.Intent
import android.widget.TextView
import androidx.core.view.isVisible
import com.blankj.utilcode.util.TimeUtils
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.module.LoadMoreModule
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.cxh.rmsq.R
import com.cxh.rmsq.common.IntentExtra
import com.cxh.rmsq.db.model.CommunityContent
import com.cxh.rmsq.db.model.VipPrivilegesBean
import com.cxh.rmsq.ui.activity.self.CommentDetailActivity
import com.cxh.rmsq.ui.activity.self.LookUserDetailActivity2
import com.cxh.rmsq.ui.widget.SelectableRoundedImageView
import com.cxh.rmsq.utils.loadImage


/**
 *
 */
class PrivilegeListAdapter(type: Int) :
    BaseQuickAdapter<VipPrivilegesBean, BaseViewHolder>(R.layout.item_privilege_list),
    LoadMoreModule {

    var type = type

    override fun convert(holder: BaseViewHolder, item: VipPrivilegesBean) {
        with(holder) {

            setText(R.id.tv_name, item.privilegeName)
            setText(R.id.tv_content, item.summary)

            loadImage(item.privilegeIcon, holder.getView<SelectableRoundedImageView>(R.id.siv_header))

        }
    }

}